-
-
Notifications
You must be signed in to change notification settings - Fork 241
feat: prevent core modules from getting loaded multiple times #1196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There are failing tests in the
|
There is a failing test in the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the PR name to follow this convention: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w? Also it may be good to add a 'BREAKING CHANGES' section in the footer (see the last section of the above doc).
I've made the requested changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after green build.
imports NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out: NativeScript/nativescript-angular#1196
NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out NativeScript/nativescript-angular#1196.
NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out NativeScript/nativescript-angular#1196.
) NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out NativeScript/nativescript-angular#1196.
NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out NativeScript/nativescript-angular#1196.
Replaces NativeScriptModule imports with NativeScriptCommonModule imports in feature modules. Removes NativeScriptAnimationsModule imports from feature modules and adds import to that module in the root module. Covers the breaking change NativeScript/nativescript-angular#1196
Replaces NativeScriptModule imports with NativeScriptCommonModule imports in feature modules. Removes NativeScriptAnimationsModule imports from feature modules and adds import to that module in the root module. Covers the breaking change NativeScript/nativescript-angular#1196
NativeScriptModule should be imported only in the root NgModule. For all other feature modules, NativeScriptCommonModule should be used instead. Check out NativeScript/nativescript-angular#1196.
This change should prevent
NativeScriptModule
andNativeScriptAnimationsModule
from getting loaded in multipleNgModules
across an Angular NativeScript app.When the core modules are imported multiple times, this change will cause Errors to be thrown with the following message:
BREAKING CHANGE: importing
NativeScriptModule
andNativeScriptAnimationsModule
in multiple ngModules is no longer allowed.To migrate:
AppModule
:NativeScriptModule
NativeScriptAnimationsModule
- only if you are planning to use Angular AnimationsNativeScriptModule
imports and replace withNativeScriptCommonModule
importNativeScriptAnimationsModule
importsExample
Before:
app.module.ts:
another.module.ts:
After:
app.module.ts:
another.module.ts: